<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <style>
body{background:url(images/main_bg_03.png) repeat;}
.list-content {
    width:850px;
	height:550px;
	font-size:12px;
	text-align:left;
	border:2px solid #92b0c6;
	color:#666;
	display:inline-block;
}
.list_page{
    margin-right:10px;
	width: 842px;
	line-height:18px;
	font-size:12px;
	text-align:right;
	color:#666;
	display:inline;
	float:left; 
}
.list_page_text{
	color:#146185;
	}

.btn02 {
	width:78px;
	height:24px;
	background:url(images/btn_list01.png) no-repeat;
	border:none;
	color:#003366;
	cursor:pointer;
	display:inline;
}
.btn03 {
	width:78px;
	height:24px;
	background:url(images/btn_list04.png) no-repeat;
	border:none;
	color:#990000;
	cursor:pointer;
	font-weight:bold;
	display:inline;
}
.edit-content {
    width:850px;
	height:550px;
	font-size:12px;
	text-align:left;
	border:2px solid #92b0c6;
	color:#666;
	display:inline-block;
}
.input01{
	width:110px;
	height:20px;
	border:1px solid #a1a1a1;
	}
a{text-decoration:none;color:#666;}
a:hover{color:#FF9900;}
</style>
    <base href="<%=basePath%>">
    
    <title>My JSP 'check.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src="web/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(function()
	{
		$("#answer").click(function()
		{
			$.ajax({
				type: "POST",
				url: "updateMailbox.action",
				dateType: "json",
				data: {"answerContent": $("#answerContent").val(), "id": $("#mailID").val()},
				success: function(returnedData){
						
						var json = eval( "("+returnedData+")" );
						alert(json.confirmUpd);
						window.location="mailboxlist.action";
				}
			});
		});
	});
	
	function clearAnswer()
	{
		document.getElementById("answerContent").value="";
	}
</script>
  </head>
  
  <body>
  
  <div class="edit-content"> 
	  <table width="800" cellpadding="2" cellspacing="2">
		<tr><td colspan="10">&nbsp;</td></tr>
		
		<s:iterator value="mailBoxList" var="val">
			<input type="hidden" id="articleid" value="<s:property value='#val.articleID'/>">
		    <input type="hidden" id="classid" value="<s:property value='#val.classID'/>">	
		<tr>
		  <td colspan="3">信件编号:&nbsp;<input id="mailID" type="text" value="<s:property value='#val.id'/>" readonly/></td>
		  <td colspan="3">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名:&nbsp;<input type="text" value="<s:property value='#val.name'/>" readonly/></td>
		  <td colspan="4">地址:&nbsp;<input type="text" value="<s:property value='#val.homeAddress'/>" readonly/></td>
		</tr>
		<tr>
		  <td colspan="3">联系电话:&nbsp;<input type="text" value="<s:property value='#val.phoneNo'/>" readonly/></td>
		  <td colspan="3">身份证号:&nbsp;<input type="text" value="<s:property value='#val.idNo'/>" readonly/></td>
		  <td colspan="2">案号:&nbsp;<input type="text" value="<s:property value='#val.caseNo'/>" readonly/></td>
		</tr>
		<tr>
		  <td colspan="3">是否涉案:&nbsp;<s:if test="{#val.isInvolved==0}">不涉案</s:if> <s:else>涉案</s:else></td>
		  <td colspan="3">是否结案:&nbsp;<s:if test="{#val.isClosed==0}">未结案</s:if> <s:else>已结案</s:else></td>
		  <td colspan="2">标题:&nbsp;<input type="text" value="<s:property value='#val.title'/>" readonly/></td>
		</tr>

	
		<tr><td colspan="10"><div id="J_imageView"></div>&nbsp;</td></tr>
		<tr>
		  <td colspan="10" align="left" valign="top">内&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;容:<textarea cols=100 rows=5 ><s:property value='#val.content'/></textarea></td>
	    </tr>
		<tr>
		  <td colspan="10" align="left" valign="top">回复区: 
		  <textarea cols=100 rows=5 id="answerContent" ></textarea>
		  </td>
	    </tr>
		<tr>
			<td align="center" colspan="10"><input type="button" name="answer" id="answer" value="回复" class="btn03" />
			&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" id="clear" name="clear" value="重置" onclick="clearAnswer()" class="btn03"/></td>
		</tr>
			</s:iterator>
	  </table> 
</div>
  
			
		
  </body>
</html>
